package carsharing;

public class Stop {
	
	//type of stop: pick or drop
	public static enum StopType {
		PICK, DROP
	}
	private StopType SType;
	private Coordinates coord;
	private int memberId;
	
	public Stop copy() {
		return new Stop(this.SType, this.coord, this.memberId);
	}
	
	public int getMemberId() {
		return memberId;
	}

	public Stop(StopType type, Coordinates c, int memberId) {
		SType = type;
		coord = c;
		this.memberId = memberId;
	}

	public StopType getStopType() {
		return SType;
	}

	public void setStopType(StopType SType) {
		this.SType = SType;
	}

	public Coordinates getCoord() {
		return coord;
	}

	public void setCoord(Coordinates coord) {
		this.coord = coord;
	}

	public void print() {
		System.out.print(SType);
		System.out.print(" ");
		if(memberId < 10) System.out.print("0");
		System.out.print(memberId);
		System.out.print("-> ");
		coord.print();
	}
	
}
